Integrand size = 30, antiderivative size = 209 \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^2} \, dx=-\frac {i (c-i d)^{3/2} \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{4 a^2 f}+\frac {\left (2 c d+i \left (2 c^2+d^2\right )\right ) \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{8 a^2 \sqrt {c+i d} f}+\frac {(2 i c+3 d) \sqrt {c+d \tan (e+f x)}}{8 a^2 f (1+i \tan (e+f x))}+\frac {(i c-d) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2} \]
-1/4*I*(c-I*d)^(3/2)*arctanh((c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2))/a^2/f+1 /8*(2*c*d+I*(2*c^2+d^2))*arctanh((c+d*tan(f*x+e))^(1/2)/(c+I*d)^(1/2))/a^2 /f/(c+I*d)^(1/2)+1/8*(2*I*c+3*d)*(c+d*tan(f*x+e))^(1/2)/a^2/f/(1+I*tan(f*x +e))+1/4*(I*c-d)*(c+d*tan(f*x+e))^(1/2)/f/(a+I*a*tan(f*x+e))^2
Time = 2.04 (sec) , antiderivative size = 248, normalized size of antiderivative = 1.19 \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^2} \, dx=\frac {\sec ^2(e+f x) \left (4 i \sqrt {c-i d} \left (c^2+d^2\right ) \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right ) (\cos (2 (e+f x))+i \sin (2 (e+f x)))+2 \sqrt {c+i d} \left (2 c^2-2 i c d+d^2\right ) \text {arctanh}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right ) (-i \cos (2 (e+f x))+\sin (2 (e+f x)))+2 (-i c+d) \cos (e+f x) ((4 c-i d) \cos (e+f x)+(2 i c+3 d) \sin (e+f x)) \sqrt {c+d \tan (e+f x)}\right )}{16 a^2 (c+i d) f (-i+\tan (e+f x))^2} \]
(Sec[e + f*x]^2*((4*I)*Sqrt[c - I*d]*(c^2 + d^2)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I*d]]*(Cos[2*(e + f*x)] + I*Sin[2*(e + f*x)]) + 2*Sqrt[c + I*d]*(2*c^2 - (2*I)*c*d + d^2)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c + I*d]]*((-I)*Cos[2*(e + f*x)] + Sin[2*(e + f*x)]) + 2*((-I)*c + d)*Cos[e + f*x]*((4*c - I*d)*Cos[e + f*x] + ((2*I)*c + 3*d)*Sin[e + f*x])*Sqrt[c + d *Tan[e + f*x]]))/(16*a^2*(c + I*d)*f*(-I + Tan[e + f*x])^2)
Time = 1.22 (sec) , antiderivative size = 219, normalized size of antiderivative = 1.05, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.433, Rules used = {3042, 4041, 27, 3042, 4079, 25, 3042, 4022, 3042, 4020, 25, 73, 221}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^2}dx\) |
\(\Big \downarrow \) 4041 |
\(\displaystyle \frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}-\frac {\int -\frac {a \left (4 c^2-5 i d c+d^2\right )+a (3 c-5 i d) d \tan (e+f x)}{2 (i \tan (e+f x) a+a) \sqrt {c+d \tan (e+f x)}}dx}{4 a^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {a \left (4 c^2-5 i d c+d^2\right )+a (3 c-5 i d) d \tan (e+f x)}{(i \tan (e+f x) a+a) \sqrt {c+d \tan (e+f x)}}dx}{8 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a \left (4 c^2-5 i d c+d^2\right )+a (3 c-5 i d) d \tan (e+f x)}{(i \tan (e+f x) a+a) \sqrt {c+d \tan (e+f x)}}dx}{8 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}\) |
\(\Big \downarrow \) 4079 |
\(\displaystyle \frac {\frac {(3 d+2 i c) \sqrt {c+d \tan (e+f x)}}{f (1+i \tan (e+f x))}-\frac {\int -\frac {(i c-d) \left (4 c^2-6 i d c-d^2\right ) a^2+(c+i d) d (2 i c+3 d) \tan (e+f x) a^2}{\sqrt {c+d \tan (e+f x)}}dx}{2 a^2 (-d+i c)}}{8 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\int \frac {(c+i d) \left (4 i c^2+6 d c-i d^2\right ) a^2+(c+i d) d (2 i c+3 d) \tan (e+f x) a^2}{\sqrt {c+d \tan (e+f x)}}dx}{2 a^2 (-d+i c)}+\frac {(3 d+2 i c) \sqrt {c+d \tan (e+f x)}}{f (1+i \tan (e+f x))}}{8 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {(c+i d) \left (4 i c^2+6 d c-i d^2\right ) a^2+(c+i d) d (2 i c+3 d) \tan (e+f x) a^2}{\sqrt {c+d \tan (e+f x)}}dx}{2 a^2 (-d+i c)}+\frac {(3 d+2 i c) \sqrt {c+d \tan (e+f x)}}{f (1+i \tan (e+f x))}}{8 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}\) |
\(\Big \downarrow \) 4022 |
\(\displaystyle \frac {\frac {2 a^2 (-d+i c) (c-i d)^2 \int \frac {i \tan (e+f x)+1}{\sqrt {c+d \tan (e+f x)}}dx-a^2 \left (d^3-i \left (2 c^3+3 c d^2\right )\right ) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx}{2 a^2 (-d+i c)}+\frac {(3 d+2 i c) \sqrt {c+d \tan (e+f x)}}{f (1+i \tan (e+f x))}}{8 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {2 a^2 (-d+i c) (c-i d)^2 \int \frac {i \tan (e+f x)+1}{\sqrt {c+d \tan (e+f x)}}dx-a^2 \left (d^3-i \left (2 c^3+3 c d^2\right )\right ) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}}dx}{2 a^2 (-d+i c)}+\frac {(3 d+2 i c) \sqrt {c+d \tan (e+f x)}}{f (1+i \tan (e+f x))}}{8 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}\) |
\(\Big \downarrow \) 4020 |
\(\displaystyle \frac {\frac {\frac {i a^2 \left (d^3-i \left (2 c^3+3 c d^2\right )\right ) \int -\frac {1}{(i \tan (e+f x)+1) \sqrt {c+d \tan (e+f x)}}d(-i \tan (e+f x))}{f}+\frac {2 i a^2 (-d+i c) (c-i d)^2 \int -\frac {1}{(1-i \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}d(i \tan (e+f x))}{f}}{2 a^2 (-d+i c)}+\frac {(3 d+2 i c) \sqrt {c+d \tan (e+f x)}}{f (1+i \tan (e+f x))}}{8 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {-\frac {i a^2 \left (d^3-i \left (2 c^3+3 c d^2\right )\right ) \int \frac {1}{(i \tan (e+f x)+1) \sqrt {c+d \tan (e+f x)}}d(-i \tan (e+f x))}{f}-\frac {2 i a^2 (-d+i c) (c-i d)^2 \int \frac {1}{(1-i \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}d(i \tan (e+f x))}{f}}{2 a^2 (-d+i c)}+\frac {(3 d+2 i c) \sqrt {c+d \tan (e+f x)}}{f (1+i \tan (e+f x))}}{8 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle \frac {\frac {\frac {4 a^2 (-d+i c) (c-i d)^2 \int \frac {1}{\frac {i \tan ^2(e+f x)}{d}+\frac {i c}{d}+1}d\sqrt {c+d \tan (e+f x)}}{d f}-\frac {2 a^2 \left (d^3-i \left (2 c^3+3 c d^2\right )\right ) \int \frac {1}{-\frac {i \tan ^2(e+f x)}{d}-\frac {i c}{d}+1}d\sqrt {c+d \tan (e+f x)}}{d f}}{2 a^2 (-d+i c)}+\frac {(3 d+2 i c) \sqrt {c+d \tan (e+f x)}}{f (1+i \tan (e+f x))}}{8 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {\frac {4 a^2 (-d+i c) (c-i d)^{3/2} \arctan \left (\frac {\tan (e+f x)}{\sqrt {c-i d}}\right )}{f}-\frac {2 a^2 \left (d^3-i \left (2 c^3+3 c d^2\right )\right ) \arctan \left (\frac {\tan (e+f x)}{\sqrt {c+i d}}\right )}{f \sqrt {c+i d}}}{2 a^2 (-d+i c)}+\frac {(3 d+2 i c) \sqrt {c+d \tan (e+f x)}}{f (1+i \tan (e+f x))}}{8 a^2}+\frac {(-d+i c) \sqrt {c+d \tan (e+f x)}}{4 f (a+i a \tan (e+f x))^2}\) |
((I*c - d)*Sqrt[c + d*Tan[e + f*x]])/(4*f*(a + I*a*Tan[e + f*x])^2) + (((4 *a^2*(I*c - d)*(c - I*d)^(3/2)*ArcTan[Tan[e + f*x]/Sqrt[c - I*d]])/f - (2* a^2*(d^3 - I*(2*c^3 + 3*c*d^2))*ArcTan[Tan[e + f*x]/Sqrt[c + I*d]])/(Sqrt[ c + I*d]*f))/(2*a^2*(I*c - d)) + (((2*I)*c + 3*d)*Sqrt[c + d*Tan[e + f*x]] )/(f*(1 + I*Tan[e + f*x])))/(8*a^2)
3.12.11.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, x]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[c*(d/f) Subst[Int[(a + (b/d)*x)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[ b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c + I*d)/2 Int[(a + b*Tan[e + f*x])^m*( 1 - I*Tan[e + f*x]), x], x] + Simp[(c - I*d)/2 Int[(a + b*Tan[e + f*x])^m *(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && !IntegerQ[m]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-(b*c - a*d))*(a + b*Tan[e + f*x])^m* ((c + d*Tan[e + f*x])^(n - 1)/(2*a*f*m)), x] + Simp[1/(2*a^2*m) Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^(n - 2)*Simp[c*(a*c*m + b*d*(n - 1)) - d*(b*c*m + a*d*(n - 1)) - d*(b*d*(m - n + 1) - a*c*(m + n - 1))*Ta n[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && LtQ[m, 0] && GtQ[n, 1] && (In tegerQ[m] || IntegersQ[2*m, 2*n])
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(a*A + b*B)*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(2*f*m*( b*c - a*d))), x] + Simp[1/(2*a*m*(b*c - a*d)) Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[A*(b*c*m - a*d*(2*m + n + 1)) + B*(a*c*m - b*d*(n + 1)) + d*(A*b - a*B)*(m + n + 1)*Tan[e + f*x], x], x], x] /; Free Q[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] && !GtQ[n, 0]
Time = 0.68 (sec) , antiderivative size = 284, normalized size of antiderivative = 1.36
method | result | size |
derivativedivides | \(\frac {2 d^{3} \left (\frac {i \left (i d -c \right )^{\frac {3}{2}} \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {i d -c}}\right )}{8 d^{3}}+\frac {i \left (\frac {-\frac {d \left (2 i c^{3}+4 i c \,d^{2}-c^{2} d -3 d^{3}\right ) \left (c +d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{2 \left (2 i c d +c^{2}-d^{2}\right )}+\frac {d \left (2 i c^{4}-3 i c^{2} d^{2}-i d^{4}-5 c^{3} d -c \,d^{3}\right ) \sqrt {c +d \tan \left (f x +e \right )}}{4 i c d +2 c^{2}-2 d^{2}}}{\left (-d \tan \left (f x +e \right )+i d \right )^{2}}-\frac {\left (2 i c^{3} d +4 i c \,d^{3}+2 c^{4}+3 c^{2} d^{2}-d^{4}\right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {-i d -c}}\right )}{2 \left (2 i c d +c^{2}-d^{2}\right ) \sqrt {-i d -c}}\right )}{8 d^{3}}\right )}{f \,a^{2}}\) | \(284\) |
default | \(\frac {2 d^{3} \left (\frac {i \left (i d -c \right )^{\frac {3}{2}} \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {i d -c}}\right )}{8 d^{3}}+\frac {i \left (\frac {-\frac {d \left (2 i c^{3}+4 i c \,d^{2}-c^{2} d -3 d^{3}\right ) \left (c +d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{2 \left (2 i c d +c^{2}-d^{2}\right )}+\frac {d \left (2 i c^{4}-3 i c^{2} d^{2}-i d^{4}-5 c^{3} d -c \,d^{3}\right ) \sqrt {c +d \tan \left (f x +e \right )}}{4 i c d +2 c^{2}-2 d^{2}}}{\left (-d \tan \left (f x +e \right )+i d \right )^{2}}-\frac {\left (2 i c^{3} d +4 i c \,d^{3}+2 c^{4}+3 c^{2} d^{2}-d^{4}\right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {-i d -c}}\right )}{2 \left (2 i c d +c^{2}-d^{2}\right ) \sqrt {-i d -c}}\right )}{8 d^{3}}\right )}{f \,a^{2}}\) | \(284\) |
2/f/a^2*d^3*(1/8*I*(I*d-c)^(3/2)/d^3*arctan((c+d*tan(f*x+e))^(1/2)/(I*d-c) ^(1/2))+1/8*I/d^3*((-1/2*d*(2*I*c^3+4*I*c*d^2-c^2*d-3*d^3)/(2*I*c*d+c^2-d^ 2)*(c+d*tan(f*x+e))^(3/2)+1/2*d*(2*I*c^4-3*I*c^2*d^2-I*d^4-5*c^3*d-c*d^3)/ (2*I*c*d+c^2-d^2)*(c+d*tan(f*x+e))^(1/2))/(-d*tan(f*x+e)+I*d)^2-1/2*(2*I*c ^3*d+4*I*c*d^3+2*c^4+3*c^2*d^2-d^4)/(2*I*c*d+c^2-d^2)/(-I*d-c)^(1/2)*arcta n((c+d*tan(f*x+e))^(1/2)/(-I*d-c)^(1/2))))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 983 vs. \(2 (162) = 324\).
Time = 0.34 (sec) , antiderivative size = 983, normalized size of antiderivative = 4.70 \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^2} \, dx=\text {Too large to display} \]
1/32*(2*a^2*f*sqrt(-(c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^3)/(a^4*f^2))*e^(4*I* f*x + 4*I*e)*log(-2*(-I*c^2 - c*d + (a^2*f*e^(2*I*f*x + 2*I*e) + a^2*f)*sq rt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sq rt(-(c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^3)/(a^4*f^2)) + (-I*c^2 - 2*c*d + I*d ^2)*e^(2*I*f*x + 2*I*e))*e^(-2*I*f*x - 2*I*e)/(I*c + d)) - 2*a^2*f*sqrt(-( c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^3)/(a^4*f^2))*e^(4*I*f*x + 4*I*e)*log(-2*( -I*c^2 - c*d - (a^2*f*e^(2*I*f*x + 2*I*e) + a^2*f)*sqrt(((c - I*d)*e^(2*I* f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(-(c^3 - 3*I*c^2*d - 3*c*d^2 + I*d^3)/(a^4*f^2)) + (-I*c^2 - 2*c*d + I*d^2)*e^(2*I*f*x + 2*I* e))*e^(-2*I*f*x - 2*I*e)/(I*c + d)) + a^2*f*sqrt(-(4*I*c^4 + 8*c^3*d + 4*c *d^3 + I*d^4)/((I*a^4*c - a^4*d)*f^2))*e^(4*I*f*x + 4*I*e)*log(-1/8*(2*c^3 + 3*c*d^2 + I*d^3 - ((I*a^2*c - a^2*d)*f*e^(2*I*f*x + 2*I*e) + (I*a^2*c - a^2*d)*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2* I*e) + 1))*sqrt(-(4*I*c^4 + 8*c^3*d + 4*c*d^3 + I*d^4)/((I*a^4*c - a^4*d)* f^2)) + (2*c^3 - 2*I*c^2*d + c*d^2)*e^(2*I*f*x + 2*I*e))*e^(-2*I*f*x - 2*I *e)/((I*a^2*c - a^2*d)*f)) - a^2*f*sqrt(-(4*I*c^4 + 8*c^3*d + 4*c*d^3 + I* d^4)/((I*a^4*c - a^4*d)*f^2))*e^(4*I*f*x + 4*I*e)*log(-1/8*(2*c^3 + 3*c*d^ 2 + I*d^3 - ((-I*a^2*c + a^2*d)*f*e^(2*I*f*x + 2*I*e) + (-I*a^2*c + a^2*d) *f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(-(4*I*c^4 + 8*c^3*d + 4*c*d^3 + I*d^4)/((I*a^4*c - a^4*d)*f^2)...
\[ \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^2} \, dx=- \frac {\int \frac {c \sqrt {c + d \tan {\left (e + f x \right )}}}{\tan ^{2}{\left (e + f x \right )} - 2 i \tan {\left (e + f x \right )} - 1}\, dx + \int \frac {d \sqrt {c + d \tan {\left (e + f x \right )}} \tan {\left (e + f x \right )}}{\tan ^{2}{\left (e + f x \right )} - 2 i \tan {\left (e + f x \right )} - 1}\, dx}{a^{2}} \]
-(Integral(c*sqrt(c + d*tan(e + f*x))/(tan(e + f*x)**2 - 2*I*tan(e + f*x) - 1), x) + Integral(d*sqrt(c + d*tan(e + f*x))*tan(e + f*x)/(tan(e + f*x)* *2 - 2*I*tan(e + f*x) - 1), x))/a**2
Exception generated. \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^2} \, dx=\text {Exception raised: RuntimeError} \]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 463 vs. \(2 (162) = 324\).
Time = 0.61 (sec) , antiderivative size = 463, normalized size of antiderivative = 2.22 \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^2} \, dx=\frac {1}{8} \, d^{3} {\left (\frac {2 \, {\left (-2 i \, c^{2} - 2 \, c d - i \, d^{2}\right )} \arctan \left (\frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right ) + c} c - \sqrt {c^{2} + d^{2}} \sqrt {d \tan \left (f x + e\right ) + c}\right )}}{c \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} + i \, \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d - \sqrt {c^{2} + d^{2}} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}}}\right )}{a^{2} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d^{3} f {\left (\frac {i \, d}{c - \sqrt {c^{2} + d^{2}}} + 1\right )}} + \frac {4 \, {\left (i \, c^{2} + 2 \, c d - i \, d^{2}\right )} \arctan \left (\frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right ) + c} c - \sqrt {c^{2} + d^{2}} \sqrt {d \tan \left (f x + e\right ) + c}\right )}}{c \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} - i \, \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d - \sqrt {c^{2} + d^{2}} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}}}\right )}{a^{2} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d^{3} f {\left (-\frac {i \, d}{c - \sqrt {c^{2} + d^{2}}} + 1\right )}} + \frac {2 \, {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}} c - 2 \, \sqrt {d \tan \left (f x + e\right ) + c} c^{2} - 3 i \, {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}} d - i \, \sqrt {d \tan \left (f x + e\right ) + c} c d - \sqrt {d \tan \left (f x + e\right ) + c} d^{2}}{{\left (d \tan \left (f x + e\right ) - i \, d\right )}^{2} a^{2} d^{2} f}\right )} \]
1/8*d^3*(2*(-2*I*c^2 - 2*c*d - I*d^2)*arctan(2*(sqrt(d*tan(f*x + e) + c)*c - sqrt(c^2 + d^2)*sqrt(d*tan(f*x + e) + c))/(c*sqrt(-2*c + 2*sqrt(c^2 + d ^2)) + I*sqrt(-2*c + 2*sqrt(c^2 + d^2))*d - sqrt(c^2 + d^2)*sqrt(-2*c + 2* sqrt(c^2 + d^2))))/(a^2*sqrt(-2*c + 2*sqrt(c^2 + d^2))*d^3*f*(I*d/(c - sqr t(c^2 + d^2)) + 1)) + 4*(I*c^2 + 2*c*d - I*d^2)*arctan(2*(sqrt(d*tan(f*x + e) + c)*c - sqrt(c^2 + d^2)*sqrt(d*tan(f*x + e) + c))/(c*sqrt(-2*c + 2*sq rt(c^2 + d^2)) - I*sqrt(-2*c + 2*sqrt(c^2 + d^2))*d - sqrt(c^2 + d^2)*sqrt (-2*c + 2*sqrt(c^2 + d^2))))/(a^2*sqrt(-2*c + 2*sqrt(c^2 + d^2))*d^3*f*(-I *d/(c - sqrt(c^2 + d^2)) + 1)) + (2*(d*tan(f*x + e) + c)^(3/2)*c - 2*sqrt( d*tan(f*x + e) + c)*c^2 - 3*I*(d*tan(f*x + e) + c)^(3/2)*d - I*sqrt(d*tan( f*x + e) + c)*c*d - sqrt(d*tan(f*x + e) + c)*d^2)/((d*tan(f*x + e) - I*d)^ 2*a^2*d^2*f))
Time = 8.75 (sec) , antiderivative size = 1580, normalized size of antiderivative = 7.56 \[ \int \frac {(c+d \tan (e+f x))^{3/2}}{(a+i a \tan (e+f x))^2} \, dx=\text {Too large to display} \]
- atan((a^4*d^6*f^2*(c + d*tan(e + f*x))^(1/2)*((3*c*d^2)/(64*a^4*f^2) - ( d^3*1i)/(64*a^4*f^2) - c^3/(64*a^4*f^2) + (c^2*d*3i)/(64*a^4*f^2))^(1/2)*8 0i)/(a^2*d^8*f*10i - a^2*c^2*d^6*f*26i + 8*a^2*c^3*d^5*f - 28*a^2*c*d^7*f) - (64*a^4*c*d^5*f^2*(c + d*tan(e + f*x))^(1/2)*((3*c*d^2)/(64*a^4*f^2) - (d^3*1i)/(64*a^4*f^2) - c^3/(64*a^4*f^2) + (c^2*d*3i)/(64*a^4*f^2))^(1/2)) /(a^2*d^8*f*10i - a^2*c^2*d^6*f*26i + 8*a^2*c^3*d^5*f - 28*a^2*c*d^7*f))*( (6*c*d^2 + c^2*d*6i - 2*c^3 - d^3*2i)/(128*a^4*f^2))^(1/2)*2i - (((c + d*t an(e + f*x))^(1/2)*(c*d^2*3i + 6*c^2*d + 3*d^3))/(24*a^2*f) + (d*(c*2i + 3 *d)*(c + d*tan(e + f*x))^(3/2)*1i)/(8*a^2*f))/(c*d*2i - (2*c + d*2i)*(c + d*tan(e + f*x)) + (c + d*tan(e + f*x))^2 + c^2 - d^2) - atan((((a^2*f*(128 *a^4*d^5*f^2 + a^4*c*d^4*f^2*384i - 256*a^4*c^2*d^3*f^2) - 4096*a^8*c*d^2* f^4*(c + d*tan(e + f*x))^(1/2)*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4*1i)/(25 6*a^4*f^2*(c*1i - d)))^(1/2))*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4*1i)/(256 *a^4*f^2*(c*1i - d)))^(1/2) - 8*a^4*f^2*(c + d*tan(e + f*x))^(1/2)*(c*d^5* 12i + 5*d^6 - 24*c^2*d^4 - c^3*d^3*24i + 8*c^4*d^2))*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4*1i)/(256*a^4*f^2*(c*1i - d)))^(1/2)*1i - ((a^2*f*(128*a^4*d ^5*f^2 + a^4*c*d^4*f^2*384i - 256*a^4*c^2*d^3*f^2) + 4096*a^8*c*d^2*f^4*(c + d*tan(e + f*x))^(1/2)*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4*1i)/(256*a^4* f^2*(c*1i - d)))^(1/2))*(-(4*c*d^3 + 8*c^3*d + c^4*4i + d^4*1i)/(256*a^4*f ^2*(c*1i - d)))^(1/2) + 8*a^4*f^2*(c + d*tan(e + f*x))^(1/2)*(c*d^5*12i...